import http from '../index'

export const changePwd = (params) => {
    return http({
        url: `/api/user/profile/update_password`,
        method: 'POST',
        data: params
    })
}
// 保存收款账户

export const accountAliSave = (data) => {
    return http({
        url: `/api/user/pay_account/alipay/add`,
        method: 'POST',
        data: data
    })
}
// 获取收款列表
export const getAccountList = (data) => {
    return http({
        url: `/api/user/pay_account/list`,
        method: 'GET',
        data: data
    })
}
// 获取银行卡验证码
export const getBankCode = (data) => {
    return http({
        url: `/api/user/pay_account/bank/send_verify_code`,
        method: 'POST',
        data
    })
}
// 获取银行卡信息
export const getBankInfo = (accountNumber) => {
    return http({
        url: `/api/user/pay_account/bank/info?accountNumber=${accountNumber}`,
        method: 'GET',
    })
}
// 保存银行卡账户
export const accountBankSave = (data) => {
    return http({
        url: `/api/user/pay_account/bank/verify_confirm`,
        method: 'POST',
        data
    })
}

// 修改头像、昵称

export const updateProfile = (data) =>{
    return http({
        url: `/api/user/profile/update_profile`,
        method: 'POST',
        data: data
    })
}